﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sunimage.Spjg.Common;
using Sunimage.Spjg.DAL.SysMgr;

namespace Sunimage.Spjg.BLL
{
    public class BulletinBl
    {
        public List<Bulletin> GetAll()
        {
            return BulletinDa.GetAll();
        }

        public Bulletin GetById(int id)
        {
            return BulletinDa.GetAll().Find(b => b.Id == id);
        }

        public void Create(Bulletin bulletin)
        {
            BulletinDa.Insert(bulletin);
        }

        public void Delete(int id)
        {
            BulletinDa.Delete(id);
        }

        public void Update(Bulletin bulletin)
        {
            BulletinDa.Update(bulletin);
        }
    }
}
